package hl.model;
// Generated 2018-5-22 21:41:31 by Hibernate Tools 4.3.5.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TMember generated by hbm2java
 */
@Entity
@Table(name = "t_member", catalog = "matcha_gym")
public class TMember implements java.io.Serializable {

	private Long pkMember;
	private TVenueInfo TVenueInfo;
	private String name;
	private Date birthday;
	private String gender;
	private String idNumber;
	private String phone;
	private Date cdatetime;
	private Date mdatetime;
	private String wxId;
	private Set<TGroupCourse> TGroupCourses = new HashSet<TGroupCourse>(0);
	private Set<TCard> TCards = new HashSet<TCard>(0);
	private Set<TMemberPhysical> TMemberPhysicals = new HashSet<TMemberPhysical>(0);
	private Set<TTraining> TTrainings = new HashSet<TTraining>(0);
	private Set<TSigning> TSignings = new HashSet<TSigning>(0);

	public TMember() {
	}

	public TMember(TVenueInfo TVenueInfo, String name, Date birthday, String gender, String idNumber, String phone, Date cdatetime, Date mdatetime, String wxId, Set<TGroupCourse> TGroupCourses,
			Set<TCard> TCards, Set<TMemberPhysical> TMemberPhysicals, Set<TTraining> TTrainings, Set<TSigning> TSignings) {
		this.TVenueInfo = TVenueInfo;
		this.name = name;
		this.birthday = birthday;
		this.gender = gender;
		this.idNumber = idNumber;
		this.phone = phone;
		this.cdatetime = cdatetime;
		this.mdatetime = mdatetime;
		this.wxId = wxId;
		this.TGroupCourses = TGroupCourses;
		this.TCards = TCards;
		this.TMemberPhysicals = TMemberPhysicals;
		this.TTrainings = TTrainings;
		this.TSignings = TSignings;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "PK_MEMBER", unique = true, nullable = false)
	public Long getPkMember() {
		return this.pkMember;
	}

	public void setPkMember(Long pkMember) {
		this.pkMember = pkMember;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PK_VENUE_INFO")
	public TVenueInfo getTVenueInfo() {
		return this.TVenueInfo;
	}

	public void setTVenueInfo(TVenueInfo TVenueInfo) {
		this.TVenueInfo = TVenueInfo;
	}

	@Column(name = "NAME", length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "BIRTHDAY", length = 10)
	public Date getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	@Column(name = "GENDER", length = 2)
	public String getGender() {
		return this.gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	@Column(name = "ID_NUMBER", length = 18)
	public String getIdNumber() {
		return this.idNumber;
	}

	public void setIdNumber(String idNumber) {
		this.idNumber = idNumber;
	}

	@Column(name = "PHONE", length = 11)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CDATETIME", length = 19)
	public Date getCdatetime() {
		return this.cdatetime;
	}

	public void setCdatetime(Date cdatetime) {
		this.cdatetime = cdatetime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "MDATETIME", length = 19)
	public Date getMdatetime() {
		return this.mdatetime;
	}

	public void setMdatetime(Date mdatetime) {
		this.mdatetime = mdatetime;
	}

	@Column(name = "WX_ID", length = 45)
	public String getWxId() {
		return this.wxId;
	}

	public void setWxId(String wxId) {
		this.wxId = wxId;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "t_group_course_info", catalog = "matcha_gym", joinColumns = { @JoinColumn(name = "PK_MEMBER", nullable = false, updatable = false) }, inverseJoinColumns = {
			@JoinColumn(name = "PK_GROUP_COURSE", nullable = false, updatable = false) })
	public Set<TGroupCourse> getTGroupCourses() {
		return this.TGroupCourses;
	}

	public void setTGroupCourses(Set<TGroupCourse> TGroupCourses) {
		this.TGroupCourses = TGroupCourses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "TMember")
	public Set<TCard> getTCards() {
		return this.TCards;
	}

	public void setTCards(Set<TCard> TCards) {
		this.TCards = TCards;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "TMember")
	public Set<TMemberPhysical> getTMemberPhysicals() {
		return this.TMemberPhysicals;
	}

	public void setTMemberPhysicals(Set<TMemberPhysical> TMemberPhysicals) {
		this.TMemberPhysicals = TMemberPhysicals;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "TMember")
	public Set<TTraining> getTTrainings() {
		return this.TTrainings;
	}

	public void setTTrainings(Set<TTraining> TTrainings) {
		this.TTrainings = TTrainings;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "TMember")
	public Set<TSigning> getTSignings() {
		return this.TSignings;
	}

	public void setTSignings(Set<TSigning> TSignings) {
		this.TSignings = TSignings;
	}

}
